﻿@model blacksoft.Models.UnidadTransporte
@using blacksoft.Helpers         

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

@if (TempData["create_failure"] != null)
{
    <div class="error grid_12">
        <h3>Nuevo: @TempData["create_failure"].</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}

<div class="block big">
    <div class="titlebar">
        <h3>Nueva Unidad</h3>
    </div>
    <div class="block_cont">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()

            <div class="form">
                @Html.ValidationSummary(true)

                <div class="form-row">
                    @Html.LabelForRequired(model => model.NumeroPlaca)
                    @Html.EditorFor(model => model.NumeroPlaca)
                    @Html.ValidationMessageFor(model => model.NumeroPlaca)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.AñoFabricacion)
                    @Html.EditorFor(model => model.AñoFabricacion)
                    @Html.ValidationMessageFor(model => model.AñoFabricacion)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.NombreMotor)
                    @Html.EditorFor(model => model.NombreMotor)
                    @Html.ValidationMessageFor(model => model.NombreMotor)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.TipoServicio)
                    @Html.DropDownList("TipoServicio", null ,"Elegir", new {@class="select"})
                    @Html.ValidationMessageFor(model => model.TipoServicio)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Estado)
                    @Html.DropDownList("Estado", null, "Elegir", new { @class = "select" })
                    @Html.ValidationMessageFor(model => model.Estado)
                </div>

                <div class="form-row">
                    @{
                        if (!ViewBag.Global)
                        {
                            @Html.Hidden("IDTerminal");
                        }
                        else
                        {
                            @Html.LabelForRequired(model => model.IDTerminal)
                            @Html.DropDownList("IDTerminal", null, "Elegir", new { @class = "select" })
                            @Html.ValidationMessageFor(model => model.IDTerminal)
                        }
                    }
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Ruta_x_UnidadTransporte)
                    @Html.DropDownList("Ruta", null, "Elegir", new { @class = "select" })
                    @Html.ValidationMessageFor(model => model.Ruta_x_UnidadTransporte)
                </div>
                <br />
                <div class="form-row">
                    <input type="submit" value="Registrar" class="btn btn-default" />
                    <br />
                    @Html.ActionLink("Regresar al listado", "Index")
                </div>
            </div>
        }

    </div>
</div>




